<template>
  <div id="app">
    <myMask :isShow="isShow" @closePage="closePage" />
    <myTable :itemList="records" @change="change" />
  </div>
</template>

<script>
import myMask from "./components/my-Mask.vue";
import myTable from "./components/my-Table.vue";

export default {
  name: "App",
  data() {
    return {
      records: [
        {
          date: "2022-01-01",
          doctor: "张三",
          diagnosis: "感冒",
          prescription: "感冒药",
        },
        {
          date: "2022-02-01",
          doctor: "李四",
          diagnosis: "头疼",
          prescription: "止疼药",
        },
        {
          date: "2022-03-01",
          doctor: "王五",
          diagnosis: "腰痛",
          prescription: "止痛贴",
        },
      ],
      isShow: false,
    };
  },
  components: {
    myMask,
    myTable,
  },
  methods: {
    closePage() {
      this.isShow = false;
    },
    change() {
      this.isShow = true;
    },
  },
};
</script>

<style></style>
